<template>
	<view>
		<uni-popup ref="commendRef" type="bottom" :maskClick="false">
			<view   class="popup-container">
				<view>
					<scroll-view scroll-x="true" class="scroll-x">
					  <uni-table border stripe emptyText="暂无更多数据">
					    <scroll-view scroll-y="true" class="scroll-y">
					      <!-- 表头 -->
					      <uni-tr>
					        <uni-th width="60" align="right">仓库</uni-th>
					        <uni-th width="60" align="right">仓位</uni-th>
					        <uni-th width="100" align="center">编码</uni-th>
					        <uni-th width="60" align="left">库存</uni-th>
					        <!-- <uni-th width="60" align="left">操作</uni-th> -->
					 
					      </uni-tr>
					
					      <!-- 表格数据 -->
					      <uni-tr v-for="(item, index) in dataList" :key="index">
					        <uni-td>{{ item.stockName }}</uni-td>
					        <uni-td>{{ item.locationName }}</uni-td>
					        <uni-td>{{ item.fmaterialNo }}</uni-td>
					        <uni-td align="center">{{ item.FBASEQTY }}</uni-td>
					        <!-- <uni-td>
					          <view class="scan-icon" @click="scanLocation(item)">
					            <image src="/static/img/scan.png" style="width: 30px; height: 30px; margin-left: 10px;" class="search-icon-image" />
					          </view>
					        </uni-td> -->
					      </uni-tr>
					    </scroll-view>
					  </uni-table>
					</scroll-view>

					
					<view
						class="popup-footer" 
						@click="closeInfoPop">
						<text>取消</text>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 扫描仓位码后弹出领料界面，可以修改领料信息 -->
		<add-pick ref="pickRef"></add-pick>
		
	
	</view>
	
</template>

<script>
	import {}  from '@/utils/api.js'
	import AddPick from "@/pages/pop/add-pick-commend.vue"
	
	export default {
		components: {
			AddPick
		},
		data() {
			return {
				dataList:[],//推荐仓位的数据集合

				selectRange:[],
				stockName:'',
				material : {},
				param:{}//传到下一个子组件的参数
		
			};
		},
		methods: {
	
		
			/**
			 * 扫描仓位
			 */
			scanLocation(item){
				
				let self = this;

			},

			closeInfoPop() {
				this.$refs.commendRef.close()
			},
			
			open(data) {
				this.dataList = data.dataList
			
				this.$refs.commendRef.open('center')
			
			},
			close() {
				this.$refs.commendRef.close()
			}
		},
		onLoad() {
			
		}
	}
</script>

<style lang="scss">
	.popup-container {
	  max-height: 90vh; /* 弹窗最大高度占屏幕 90% */
	  background: #fff;
	  display: flex;
	  flex-direction: column;
	  width: 100%;
	 
	}
	.popup-footer {
	  min-height: 50rpx;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	}
.scroll-x {
  width: 100%;
  max-width: 90%;
  overflow-x: auto;
}

.scroll-y {
  flex: 1;
  max-height: 70vh;
  overflow-y: auto;
}

uni-table {
  min-width: 800px; /* 根据你实际的列数设置最小宽度 */
  table-layout: fixed;
  background-color: #409eff;
}
.selectPopup-panel{
	background-color: #fff;
	width: 250px;
	height: 100px;
}

.manual-input {
	width: 100%;
	height: 30px;
	padding: 0 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
}
.manual-input:focus {
	border-color: #409eff; /* 聚焦时高亮 */
	box-shadow: 0 0 4px rgba(64, 158, 255, 0.5);
}

</style>
